package com.agilegroup.crm;

import android.app.Application;
import android.util.Log;

import com.agilegroup.crm.service.JsonSpiceService;
import com.octo.android.robospice.SpiceManager;

/**
 * @author Hisham
 *
 */
public class AgileApplication extends Application{

	private static AgileApplication singleton;
	public SpiceManager spiceManager = new SpiceManager( JsonSpiceService.class );
	
	public static AgileApplication getInstance() {
		return singleton;
		}    
	 @Override
		public void onCreate() {
			super.onCreate();
			singleton = this;
			spiceManager.start( this );
			Log.d("SPice Service", "Started");
			
		}
	 @Override
		public void onTerminate() {
		 	spiceManager.shouldStop();
			super.onTerminate();
			Log.d("SPice Service", "Stoped");
		}
}
